<?php
    $redis=new Redis();
    $redis->connect('localhost','6379');
    $filebase=dirname(__FILE__).'/../';
    //$redis->select(1);
    $ary=$redis->keys("*_log_queue*");
    print_r($ary);
    foreach( $ary as $lkey){
    	print_r($lkey);
        while($lval =$redis->lpop($lkey)){
        	print_r($lval);
            file_put_contents($filebase.$lkey,$lval."\n",FILE_APPEND);
        }
    }
   ?>